package org.phantom.securityframework.auth;

import org.apache.shiro.util.ClassUtils;

import org.phantom.securityframework.api.factory.SpringOSGIManagerFactory;


public enum DefaultConfig {

//	anon(AnonymousFilter.class),
//    authc(FormAuthenticationFilter.class),
//    authcBasic(BasicHttpAuthenticationFilter.class),
//    logout(LogoutFilter.class),
//    noSessionCreation(NoSessionCreationFilter.class),
//    perms(PermissionsAuthorizationFilter.class),
//    port(PortFilter.class),
//    rest(HttpMethodPermissionFilter.class),
//    roles(RolesAuthorizationFilter.class),
//    ssl(SslFilter.class),
//    user(UserFilter.class);
	
	factory(SpringOSGIManagerFactory.class);
	
	
	@SuppressWarnings("rawtypes")
	private final Class filterClass;

    @SuppressWarnings("rawtypes")
	private DefaultConfig(Class filterClass) {
        this.filterClass = filterClass;
    }
	
    public Object newInstance() {
        return ClassUtils.newInstance(this.filterClass);
    }

    @SuppressWarnings("rawtypes")
	public Class getRealmClass() {
        return this.filterClass;
    }
    
    
    
}
